<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>document</h1>
    <!-- <script src="./vue.js"></script> -->
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
      const vm = new Vue({
        // 配置项 数据
        // data: {
        //   title: "hello",
        // },
        data() {
          return {
            title: "hello",
          };
        },
        methods: {
          say() {
            console.log("hello jack");
            console.log(this.title);
          },
        },
        beforeCreate() {
          console.log("beforeCreate", "vue对象创建前", this.title);
        },
        created() {
          console.log("created", "vue对象创建完成", this.title);
        },
      });

      // vm.title = "hello";
      // vm.say = function () {console.log('hello jack')};
      console.log(vm.title);
      vm.say();
    </script>
  </body>
</html>
